package com.soft.base.spring.redis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.connection.RedisServer;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.StringRedisSerializer;
/**
 * class
 *
 * @author user
 * @date 2020/06/05
 */
public class RedisConfig {
    @Autowired
    RedisConnectionFactory redisConnectionFactory;

    @Autowired
    public void setRedisTemplate(RedisTemplate redisTemplate) {
        redisTemplate.setKeySerializer(new StringRedisSerializer());
        RedisUtil.setRedisTemplate(redisTemplate);
    }
}
